package com.xhsj.user.hr.process.processDefinition.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xhsj.user.hr.process.processDefinition.entity.TbGlobalBusiness;
import com.xhsj.user.hr.process.processDefinition.query.ListBusinessQuery;
import com.xhsj.user.hr.process.processDefinition.query.ShowBusinessQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 流程设计-流程申请匹配表 Mapper 接口
 * </p>
 *
 * @author liuqinghua
 * @since 2020-08-28
 */
@Mapper
public interface TbGlobalBusinessMapper extends BaseMapper<TbGlobalBusiness> {

    /**
     * 流程列表展示
     * @author liuqinghua
     * @date Aug 28, 2020 4:36:28 PM
     */
    IPage<ListBusinessQuery> listBusiness(Page<ListBusinessQuery> page,
                                          @Param("dictId") Integer dictId,
                                          @Param("organizationId") Integer organizationId);

    /**
     * @Description:  查看具体信息
     * @Author: liuqinghua
     * @Date: 2020/8/31
     */
    ShowBusinessQuery showBusiness(@Param("id") long id);

    /**
     * @Description:  判断是否有对应的流程
     * @Author: liuqinghua
     * @Date: 2020/8/31
     */
    Long getProcess(@Param("organizationId") Long organizationId,
                   @Param("roleId")Long roleId,
                   @Param("dictId") Integer dictId,
                   @Param("id") Long id,
                   @Param("judgeId") Long judgeId);
}
